Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add region/country support for client and user models #95

Merged
merged 8 commits into from
Jan 12, 2025

Conversation

Dev-R
Copy link
Contributor

@Dev-R Dev-R commented Nov 15, 2024

Add functionality to accurately fetch and display a user's region or country in the client and user models.

Changes

  • Added region/country methods to the client and user models.
  • Updated documentation to reflect the new feature.
  • Added new unit tests to the client and user models.

References

  • Resolves #90: Fetch user’s country.
  • Addresses #83: Region endpoint support.

Sample

  • image

@isFakeAccount isFakeAccount self-requested a review January 6, 2025 00:14
Copy link
Owner

@isFakeAccount isFakeAccount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if you are able to add test that would be nice.

src/psnawp_api/models/client.py Outdated Show resolved Hide resolved
src/psnawp_api/models/user.py Outdated Show resolved Hide resolved
src/psnawp_api/utils/misc.py Outdated Show resolved Hide resolved
src/psnawp_api/utils/misc.py Outdated Show resolved Hide resolved
@Dev-R Dev-R requested a review from isFakeAccount January 11, 2025 20:40
- Change get_region to return Country obj from Pycountries
- Update test based on the change above
- Update dependencies
- Re-run unit tests to generate new cassettes
- Fix an issue in test_search__get_game_content_id
@isFakeAccount isFakeAccount merged commit 78d43b3 into isFakeAccount:master Jan 12, 2025
1 check passed
@Dev-R Dev-R deleted the add-users-region-support branch January 12, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any idea what the endpoint is that is used to fetch a users country?
2 participants